package butines.core.game.steering;

import java.util.Collection;

import butines.core.game.Vehicle;
import butines.core.math.Vector2f;

public class CohesionBehavior extends AbstractBehavior {

	private Vehicle owner;
	private Collection<? extends Vehicle> neighbors;
	private Vector2f steeringForce;

	public CohesionBehavior(Vehicle owner) {
		this.owner = owner;
	}

	@Override
	public Vector2f calculate() {
		return steeringForce = cohesion(owner, neighbors);
	}

	public Vector2f getSteeringForce() {
		return steeringForce;
	}

	public Collection<? extends Vehicle> getNeighbors() {
		return neighbors;
	}

	public void setNeighbors(Collection<? extends Vehicle> neighbors) {
		this.neighbors = neighbors;
	}
	
}